using System;
using System.Collections.Generic;
using System.Text;

using Open.Data.Persistence;

using Open.Data.Persistence.SqlServer;

namespace Open.Data.Persistence.Testing
{
    public class Order: Table
    {
        //Property variables
        private int _id;
        private decimal _shipping;
        private decimal _tax;
        private decimal _itemTotal;
        private int _weight;
        private ShippingAddress _shippingAddress;
        private Address _billingAddress;

        #region Interface

        [PrimaryKey]
        public virtual int Id
        {
            get
            {
                return _id;
            }
            set
            {
                _id = value;
            }
        }

        [Column]
        public decimal Shipping
        {
            get 
            { 
                return _shipping;
            }
            set
            { 
                _shipping = value;
            }
        }

        [Column, SqlFixed(18,2)]
        public decimal Tax
        {
            get
            { 
                return _tax; 
            }
            set
            { 
                _tax = value;
            }
        }

        [Column]
        public decimal ItemTotal
        {
            get
            { 
                return _itemTotal;
            }
            set
            { 
                _itemTotal = value;
            }
        }

        [Column]
        public int TotalWeight
        {
            get 
            { 
                return _weight; 
            }
            set 
            { 
                _weight = value; 
            }
        }

        [Column]
        public ShippingAddress ShippingAddress
        {
            get
            {
                return _shippingAddress;
            }
            set
            {
                _shippingAddress = value;
            }
        }

        [Column]
        public Address BillingAddress
        {
            get
            {
                return _billingAddress;
            }
            set
            {
                _billingAddress = value;
            }
        }

        #endregion
    }
}
